{literal}
<script language="javascript">
function submit_insurancecompany() {
    if(document.insurancecompany.name.value.length>0) { 
        top.restoreSession();
	    document.insurancecompany.submit();
		//Z&H Removed redirection
    } else{
        document.insurancecompany.name.style.backgroundColor="red";
        document.insurancecompany.name.focus();
    }
}

function jsWaitForDelay(delay) {
     var startTime = new Date();
     var endTime = null;
     do {
        endTime = new Date();
     } while ((endTime - startTime) < delay);
}
</script>
{/literal}
<form name="insurancecompany" method="post" action="{$FORM_ACTION}">
<!-- it is important that the hidden form_id field be listed first, when it is called it populates any old information attached with the id, this allows for partial edits
		if it were called last, the settings from the form would be overwritten with the old information-->
<input type="hidden" name="form_id" value="{$insurancecompany->id}" />
<table style="font-size:9pt;" width="500px" CELLSPACING="0" CELLPADDING="3">
<tr>
	<td width="220px" VALIGN="MIDDLE" >{xl t='Name'}</td>
	<td VALIGN="MIDDLE" >
		<input type="text" size="40" name="name" value="{$insurancecompany->get_name()}" onKeyDown="PreventIt(event)" /> ({xl t='Required'})
	</td>
</tr>
<tr>
	<td VALIGN="MIDDLE" >{xl t='Attn'}</td>
	<td VALIGN="MIDDLE" >
		<input type="text" size="40" name="attn" value="{$insurancecompany->get_attn()}" onKeyDown="PreventIt(event)" />
	</td>
</tr>

<tr>
	<td VALIGN="MIDDLE" >{xl t='Address'}</td>
	<td VALIGN="MIDDLE" >
		<input type="text" size="40" name="address_line1" value="{$insurancecompany->address->line1}" onKeyDown="PreventIt(event)" />
	</td>
</tr>
<tr>
	<td VALIGN="MIDDLE" >{xl t='Address'}</td>
	<td VALIGN="MIDDLE" >
		<input type="text" size="40" name="address_line2" value="{$insurancecompany->address->line2}" onKeyDown="PreventIt(event)" />
	</td>
</tr>
<tr>
	<td VALIGN="MIDDLE" >{xl t='City, State Zip'}</td>
	<td VALIGN="MIDDLE" >
		<input type="text" size="25" name="city" value="{$insurancecompany->address->city}" onKeyDown="PreventIt(event)" /> , <input type="text" size="2" maxlength="2" name="state" value="{$insurancecompany->address->state}" onKeyDown="PreventIt(event)" /> <input type="text" size="5" name="zip" value="{$insurancecompany->address->zip}" onKeyDown="PreventIt(event)" />
	</td>
</tr>
<tr>
	<td VALIGN="MIDDLE" >{xl t='Phone'}</td>
	<td VALIGN="MIDDLE" >
		<input TYPE="TEXT" NAME="phone" SIZE="12" VALUE="{$insurancecompany->get_phone()}" onKeyDown="PreventIt(event)" />
	</td>
</tr>
<tr>
	<td VALIGN="MIDDLE" >{xl t='CMS ID'}</td>
	<td VALIGN="MIDDLE" >
		<input type="text" size="15" name="cms_id" value="{$insurancecompany->get_cms_id()}" onKeyDown="PreventIt(event)" />
{php} if ($GLOBALS['support_encounter_claims']) { {/php}
    &nbsp;&nbsp;{xl t='For Encounter Claims'}:
		<input type="text" size="15" name="alt_cms_id" value="{$insurancecompany->get_alt_cms_id()}" onKeyDown="PreventIt(event)" />
{php} } {/php}
	</td>
</tr>
<tr>
	<td VALIGN="MIDDLE">{xl t='Payer Type'}</td>
	<td VALIGN="MIDDLE">
		{html_options name="freeb_type" options=$insurancecompany->freeb_type_array selected=$insurancecompany->get_freeb_type()}
	</td>
</tr>
<!--
This is now deprecated use the newer x12 partner code instead
<tr>
	<td COLSPAN="1" ALIGN="LEFT" VALIGN="MIDDLE">X12 Receiver ID</td>
	<td COLSPAN="2" ALIGN="LEFT" VALIGN="MIDDLE">
		<input type="text" name="x12_receiver_id" value="{$insurancecompany->get_x12_receiver_id()}" >
	</td>
</tr>-->
<tr>
	<td VALIGN="MIDDLE">{xl t='Default X12 Partner'}</td>
	<td VALIGN="MIDDLE">
		{html_options name="x12_default_partner_id" options=$x12_partners selected=$insurancecompany->get_x12_default_partner_id()}
	</td>
</tr>
<tr height="25"><td colspan=2>&nbsp;</td></tr>
<tr>
	<td colspan="2"><a href="javascript:submit_insurancecompany();" class="css_button"><span>{xl t='Save'}</span></a><a href="controller.php?practice_settings&insurance_company&action=list"  {php} if (!$GLOBALS['concurrent_layout']) echo "target='Main'"; {/php} class="css_button" onclick="top.restoreSession()">
<span>{xl t='Cancel'}</span></a></td>
</tr>
</table>
<input type="hidden" name="id" value="{$insurancecompany->id}" />
<input type="hidden" name="process" value="{$PROCESS}" />
</form>